/**
 * Created by Mark_ren on 2017/5/22.
 * 苟富贵,無相忘
 */
var co = require('co');
var seqModule = require('../../../routes/createModules');
var seq = new seqModule();
var util = require('../../../common/util');


var literatureALogController = {


    /**
     *  增加文献申请记录
     * @param req
     * @param res
     */
    addLiteratureALog: function (req, res) {
        co(function () {
            var uuid =util.getUUID();
            req.query.id=uuid;
            req.query.createTime=util.getNowTime();
            seq.literatureApplicationLogModule.create(req.query).then(function(result){
                res.status(200).json({
                    success:true,
                    message: "添加成功",
                    result:result
                });
            })
        }).catch(function (e) {
            res.json({ 'success': false, 'msg': '新增失败' });
            console.log(e);
        })

    }
}
module.exports = literatureALogController;